package com.ruirenyun.util.annotation.validator;


import org.springframework.util.StringUtils;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * Created with IntelliJ IDEA.
 *
 * @author Deng Ye
 * @version 1.0
 * @date 2020/9/11
 * @description 参数校验工具类 不为空
 * @modifiedBy
 */
public class NotEmptyValidator implements ConstraintValidator<NotEmpty, Object> {

    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        return !StringUtils.isEmpty(value);

    }
}
